<?php

/*
|--------------------------------------------------------------------------
| Application Routes
| 应用程序路由
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| 在这里你可以为应用程序注册所有的路由。
| It's a breeze. Simply tell Laravel the URIs it should respond to
| 这非常的容易。简单的告诉 Laravel 这些 URI 应该响应，
| and give it the Closure to execute when that URI is requested.
| 并且给它一个闭包，当那个URI发起请求后执行它。
|
*/
header('X-Frame-Options:ALLOW-FROM http://timepicker.cn');

//首页
Route::get('/', 'HomeController@home_page');
//搜索列表
Route::get('/search', 'BookController@searchBook');
//搜索列表api
Route::get('/api/lib/search' , 'BookController@searchBookApi');
//书籍详情
Route::get('/detail', 'BookController@bookDetail');




//用户中心 (个人信息，同步时间等等)
Route::get('/center', 'UserExtraController@userCenter');
//用户收藏
Route::get('/blike', 'UserExtraController@userCollection');
//当前借阅
Route::get('/bnow', 'UserExtraController@userCurrentRent');
//借阅历史
Route::get('/bhistory', 'UserExtraController@userRentHistory');



//拾光登陆
Route::get('/ptime/login' , 'HomeController@goToPtimeLogin');

//获取验证码
Route::get('api/lib/pre','UserController@pre');
//图书馆登陆
Route::post('api/lib/login','UserController@login');




//续借前check
Route::post('api/rerent/check' , 'UserExtraController@reRentBookCheck');
//续借
Route::post('api/rerent' , 'UserExtraController@reRentBook');
//续借图片
Route::get('api/rerent/pic' , 'UserExtraController@reRentPic');
//相关图书
Route::get('api/related' , 'BookController@relatedData');
//收藏图书
Route::post('api/book/collect' , 'UserController@collectBook');




//检查用户是否同步过信息
Route::get('user/check_sync' , 'UserExtraController@checkSync');
//识别验证码直接登陆
Route::get('api/tess' , 'VerifyController@Tess');
//识别验证码直接同步
Route::get('api/lib/extra' , 'UserController@extraPre');


//识别验证码直接同步
Route::get('api/sync' , 'UserController@updateInfo');



//
Route::get('/test/test' , 'HomeController@goToPtimeCampus');
Route::get('/test/test2' , 'HomeController@goToPtimeCampus');



// //每日轮询
// Route::get('dailyCheck' , 'BookController@checkUserBook');
